package com.demo.service.app.task;

import java.time.LocalDateTime;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.demo.service.app.service.PerformerService;
import com.demo.service.app.service.TabCloudService;

import lombok.extern.slf4j.Slf4j;

@Component
@Slf4j
public class MyTask {
	@Autowired
	private PerformerService performerService;
	
	@Autowired
	private TabCloudService tabCloudService;

//	@Scheduled(cron = "0 0 0/1 * * ?")
//	public void task1() {
//	    //大约21分钟
//		log.info("开始时间：{}",LocalDateTime.now());
//		performerService.batchAdd();
//		log.info("结束时间：{}",LocalDateTime.now());
//	}
	
//	@Scheduled(cron = "0 0/10 * * * ?")
//	public void task2() {
//	    //大约1分钟
//		log.info("开始时间：{}",LocalDateTime.now());
//		tabCloudService.batchAdd();
//		log.info("结束时间：{}",LocalDateTime.now());
//	}
	
//	@Scheduled(cron = "0 12 0/1 * * ?")
//	public void task3() {
//		log.info("开始时间：{}",LocalDateTime.now());
//		performerService.addFromTab();
//		log.info("结束时间：{}",LocalDateTime.now());
//	}
	
//	@Scheduled(cron = "0 35 0/2 * * ?")
//	public void task4() {
//		log.info("开始时间：{}",LocalDateTime.now());
//		performerService.addPerformerDetail();
//		log.info("结束时间：{}",LocalDateTime.now());
//	}
}
